<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .bear {
            position: absolute;
            left: 0px;
            top: 200px;
            width: 200px;
            height: 100px;
            background: url(../img/bear.png) no-repeat;
            /* 元素可以添加多个动画，用逗号分割即可 */
            animation: bearMove 1s steps(8) infinite, move 3s linear forwards;
            z-index: 1;
        }
        .white, .black {
            position: absolute;
            background-size: cover;
            width: 1920px;
            height: 336px;
        }
        .white {
            background: url(../img/m-bg1.png) no-repeat;   
            animation: whitemove 6s linear infinite; 
        }
        .black {
            background: url(../img/m-bg2.png) no-repeat;    
            animation: blackmove 8s linear .3s infinite; 
        }
        @keyframes bearMove {
            0% {
                background-position: 0 0;
            }
            100% {
                background-position: -1600px 0;
            }
        }
        @keyframes move {
            0% {
                left: 0px;
            }
            100% {
                left: 50%;
                transform: translateX(-50%);
            }
        }
        @keyframes whitemove {
            0% {
                background-position: 0 0;
            }
            100% {
                background-position: -1920px 0;
            }
        }
        @keyframes blackmove {
            0% {
                background-position: 0 0;
            }
            100% {
                background-position: -1920px 0;
            }
        }
    </style>
</head>
<body>
    <div class="bear"></div>
    <div class="white"></div>
    <div class="black"></div>
    
</body>
</html>